﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using DataAccess.Classes;
using DataAccess;

namespace Webmau
{
    public partial class DatPhong : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                PopulateControls();
            }
        }
        private void PopulateControls()
        {
            string id = Request.QueryString["IDDanhSach"];
            PhongTro1 data = PhongTro1.Single(id);
            if (data != null)
            {
                lblTen.Text = data.Ten;
                lblThongTin.Text = HttpUtility.HtmlEncode(data.ThongTin);
                lblGia.Text = data.GiaTien.ToString("0,000") + " VNĐ";
                imgHinh.ImageUrl = Link.ToHinhDanhSachDiaDiem(data.HinhDaiDien);

            }
        }
    }
}